<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //函数 就是封装了一段可以被重复执行调用的代码块
        //1.声明函数
        function sayHi() {
            console.log('哈哈哈');
        }

        //2.调用函数
        sayHi();
    </script>
</head>

<body>

</body>

</html>